<template>
  <div class="control_content">
    <div class="head" ref="controlContentHead">{{ headName }} <slot name="btn"></slot></div>
    <div class="main">
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    headName: {
      type: String,
      default: '单子名称',
    },
  },
  data() {
    return {};
  },
  computed: {
    controlContentHead() {
      return this.$refs.controlContentHead;
    },
  },
  methods: {},
};
</script>

<style lang="scss">
.control_content {
  width: 50%;
  height: 50%;
  .head {
    text-align: center;
    height: 5vh;
    line-height: 5vh;
    border-bottom: 1px solid #000;
    font-size: 16px;
    font-weight: 700;
  }
  .main {
    width: 100%;
    height: calc(100% - 5vh);
    overflow: auto;
  }
}
</style>
